#pragma once
#include <cstddef>

class TextSpan
{
public:
  TextSpan(size_t start, size_t length)
      : Start(start), Length(length), End(start + length) {}

  static TextSpan FromBounds(size_t start, size_t end)
  {
    auto length = end - start;
    return TextSpan(start, length);
  }

public:
  size_t Start;
  size_t Length;
  size_t End;
};